<template>
  <div class="body1" style="padding-top:10px;">
    <div class="form_select">
      <div>
          <el-input class="select_input1" v-model="form.username" 
          size="small" placeholder="员工姓名"></el-input>
          <el-button type="primary"  size="small" @click="getList">&nbsp;搜&nbsp;&nbsp;索&nbsp;</el-button>
      </div>
      <div class="select_right">
          <el-button type="primary"  size="small" @click="exportExcel">导出Excel</el-button>
      </div>
    </div>
    <resultTable :list="list"></resultTable>
  </div>
</template>

<script>
import resultTable from "./resultTable"
import {excelExport} from "../../public/excelExport"
  export default {
    data() {
      return {
        list:[],
        form:{},
        itemShow:false,
        itemList:[]
      };
    },
    components: {
      "resultTable": resultTable
    },
    created: function() {
      this.getList()
    },
    methods: {
      getList:function(){
        this.form.store_id = localStorage.getItem('store_id')
        var that = this
        this.$get('form/result',this.form).then((res) => {
          that.list = res.data
        })
      },
      dateChage:function(e){
        this.form.date = e
      },
      exportExcel:function() {
        let title = '员工业绩表'
        excelExport(title)
        return false;
      }
  }
};
</script>
<style>



</style>